package com.itheima.app.interceptor;

import com.itheima.domain.db.User;

public class UserHolder {

    private static ThreadLocal<User> th = new ThreadLocal<>();

    public static void set(User user) {
        th.set(user);
    }

    public static User get() {
        return th.get();
    }

    //删除th中的user
    public static void remove() {
        th.remove();
    }

}
